﻿

define(["service/service", "service/httpService"], function (service) {
    service.factory("distributionService", function (httpService) {
        var methods = {
            gets: function (params) {
               
                return httpService.get("/distribution/gets", params);
            },
            searchmerchant: function (params) {
              
                return httpService.get("/distribution/getsmerchant", params);
            },
            savemerchant: function (params) {
                return httpService.post("/distribution/Post", params);
            },
            get_categorys: function () {
                return httpService.get("/distribution/categorys");
            },
            save: function (params) {
                return httpService.post("/distribution/save/", params);
            },
            get_products: function () {
                return httpService.get("/distribution/GetProducts");
            },
            sold_out: function (id) {
                return httpService.get("/distribution/SoldOut/" + id);
            },
            detail: function (params) {
              
                return httpService.get("/distribution/detail", params);
            }

        }
        return methods;
    });
});